﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DeviceTypeManage.aspx.cs"
    Inherits="DeviceTypeManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>无标题页</title>
    <link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="Form1" method="post" name="form1" runat="server">
    <table width="842" border="0" cellpadding="0" cellspacing="0" align="center">
        <tr style="color: blue; font-size: 20px; height: 20px;">
            <td style="height: 20px">
                <img src="images/list.gif" width="20px" height="20px" />设备管理--&gt;设备类别管理
            </td>
        </tr>
        <tr>
            <td>
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                    BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px"
                    CellPadding="3" DataKeyNames="deviceTypeId" DataSourceID="deviceTypeDataSource"
                    Width="842px" OnRowDataBound="GridView1_RowDataBound" CellSpacing="2">
                    <Columns>
                        <asp:BoundField DataField="deviceTypeId" HeaderText="设备类别编号" InsertVisible="False"
                            ReadOnly="True" SortExpression="deviceTypeId" />
                        <asp:BoundField DataField="deviceTypeName" HeaderText="设备类别名称" SortExpression="deviceTypeName" />
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <asp:Literal ID="operation" runat="server"></asp:Literal>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#6A5ACD" />
                    <RowStyle BackColor="#D6DFF7" ForeColor="#8C4510" />
                    <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
                    <PagerStyle ForeColor="#FFFFFF" HorizontalAlign="Center" BackColor="#6A5ACD" />
                    <HeaderStyle BackColor="#799AE1" Font-Bold="True" />
                </asp:GridView>
            </td>
        </tr>
        <tr style="color: blue; font-size: 14px;">
            <td style="height: 25px">
                添加新类别:<asp:TextBox ID="DeviceTypeName" runat="server" Width="117px"></asp:TextBox>
                <asp:Button ID="Btn_Add" runat="server" OnClick="Btn_Add_Click" Text="添加" />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="DeviceTypeName"
                    ErrorMessage="类别名称输入不能为空!"></asp:RequiredFieldValidator>
            </td>
        </tr>
    </table>
    <asp:SqlDataSource ID="deviceTypeDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT [deviceTypeName], [deviceTypeId] FROM [deviceType]"></asp:SqlDataSource>
    </form>
</body>
</html>
